home *** CD-ROM | disk | FTP | other *** search
/ Cracking 2 / Cracking II..iso / Texty / crackme / SiFLyiNG_3.txt < prev    next >
Encoding:
Text File  |  1999-07-25  |  3.5 KB  |  92 lines

  1.  
  2.  
  3.         SiFLyiNG's
  4.                 Tutorial #3
  5.  
  6. ____________________________________________________________________________
  7.  
  8. Target          : CupOfCoffee Crackme 1 in VB
  9.                   d/l it on Eternal Bliss Site : http://crackmes.cjb.net
  10. Protection type : Code, VB
  11. Level           : the author says it's a little tricky but easy
  12. Tools needed    : SoftIce 3.xx
  13.                   Some basis of VB cracking
  14. ____________________________________________________________________________
  15.  
  16. Before Beginning...
  17.  
  18.         First, you run the crackme... type any serial you want. First
  19. observation : wingdings 2 font, so what you type appears as a nonsence.
  20. But that's not a problem... i think there is nothing else to say.
  21.  
  22. ____________________________________________________________________________
  23.  
  24. The essay...
  25.  
  26.         This crackme is programmed in VB, so we can use breakpoints on
  27. functions like : MultiByteToWideChar ( converts a string to wide char, ie
  28. the chars of the string are separated by null char ), __vbaStrCmp or
  29. __VbaStrComp. Let's use __VbaStrCmp. So you type in Sice 'Bpx __vbaStrCmp'.
  30.         Come back to the prog, and type '123456' for example. Press 'check'
  31. and you're back to SoftIce. There you press F11 to return from the call to
  32. the routine. Then you see :
  33.  
  34. CALL [MSVBVM50!__vbaStrCmp]
  35.  
  36. but if you trace up a bit the code you see :
  37.  
  38. MOV ECX, [EBP-18]
  39. PUSH ECX
  40. PUSH 00401BE4
  41. CALL [MSVBVM50!__vbaStrCmp]
  42.  
  43.         Hummm, there must the solution here. Disable your breakpoints by
  44. 'Bd *' then make a breakpoint on the line PUSH ECX just before the call (just
  45. double-click on the line).
  46.         Exit from SoftIce, and press 'Check it' another time. Then you're
  47. back in SoftIce and you see:
  48.  
  49. PUSH ECX
  50. PUSH 00401BE4
  51. CALL [MSVBVM50!__vbaStrCmp]
  52.  
  53. Press 'd ECX' and you should see '1.2.3.4.5.6' where the points represent
  54. null char (our fake code has been converted to WideChar). So, our fake code
  55. converted to WideChar is pushed just before the Call __vbaStrCmp. It means
  56. that it will be compared with the other string pushed before the Call which
  57. MUST be the real code. So 00401BE4 must be the adress where the real code is
  58. stored. So we try : 'd 401BE4' but what can we see ???
  59.  
  60. 2E 00 2E 00 2E 00 2E 00 - 2E 00 2E 00 2E 00 2E 00   ................
  61. 2E 00 2E 00 00 00 00 00 - 24 00 00 00 49 00 6E 00   ........$...I.n.
  62.  
  63. What's that ??? our string is compared with null char ??? no no. Just open
  64. your eyes and you'll see the truth :)
  65. We know that our code is in WideChar... so it must be compared with a widechar
  66. string. And look at the hexa display :
  67.  
  68. 2E 00 2E 00 2E 00 2E 00 - 2E 00 2E 00 2E 00 2E 00   ................
  69. 2E 00 2E 00 00 00 00 00 - 24 00 00 00 49 00 6E 00   ........$...I.n.
  70.  
  71. Isn't this WideChar ? of course it is ! But what's these 2E ? 2E is simply
  72. the ascii code for the '.' So the code might be '..........'
  73. Count the number of 2E : there are 10 so there are 10 '.' in the code.
  74.  
  75. Disable all breakpoints, exit from SoftIce and enter '..........' then press
  76. the check button : cool :)
  77.  
  78. ____________________________________________________________________________
  79.  
  80.         The end...
  81.  
  82.         VoilĂ , it's finished... we found the only correct code for this
  83. crackme. The author had reason : 'little tricky but easy'
  84.         
  85.         SiFLyiNG
  86.                 siflying@ifrance.com
  87.  
  88. Greetz : Eternal Bliss, Acid Burn, Lucifer48, Skymarshall, Gluconzip, Earwax
  89.          all the french crackers, all writers of tutorial...
  90.  
  91.  
  92.